-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix money returns caused by an account shrinking #1173
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when shrinking the target account, it may or may not be owned by the system program so the transfer may not work
You'll want to do the system program shrink transfer if the account is system program owned but manual lamport math otherwise. Welcome to the confusing world of Solana programming 😁 |
ef06abb
to
777df49
Compare
777df49
to
7046136
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one comment but otherwise this is good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
added the possibility to return lamports after an account has been shrunk